<?php

class Ext_Forms_EditResource extends Ext_Forms_BasicForm
{

    
    public function init()
    {
        parent::init();
        $element = new Zend_Form_Element_Text( 'name' );
        $element->setLabel( 'Nombre del Recurso' )->setRequired( true )->addValidator( 'NotEmpty' );
        $this->addElement( $element );
        
        
        $this->addElement('select', 'application_id', array(
            'label'      => 'Aplicacion:',
            'required'   => true,
            'filters'    => array('StringTrim'),
            'validators' => array( 'int' )
        ));
        
        $application = new Ext_Model_Application();
        $this->application_id->setMultiOptions( $application->getActiveAsArray() );
    }
}
